<?php
class ChartBoostFilter extends Ifilter {

	public function __construct() {
		$keyTranslateMap = array("Date" => "date" , 
								"Money Earned" => "revenue" ,
								"Impressions Delivered" => "impressions");
		
		$valueTranslateMap = array(
								"Money Earned" => '/^\$(\d+\.*\d*)$/');
		
		$this->keyTranslateMap = $keyTranslateMap;
		$this->valueTranslateMap = $valueTranslateMap;
		
		
	}
	
	protected function translate($key,$value) {
		if (array_key_exists($key, $this->valueTranslateMap)) {
			$value_translated = preg_replace($this->valueTranslateMap[$key], '$1', $value);
		} else {
			$value_translated = $value;
		}
		return $value_translated;
	}

	
}